import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 24,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: true,
    addBtnText: '新增',
    editBtn: true,
    delBtn: true,
    viewBtn: true,
    searchLabelWidth: 120,
    column: [

      {
        label: '航运公司名称',
        prop: 'p1',
        search: true,
        overHidden: true,
      },
      {
        label: '船舶名称',
        prop: 'p2',
        search: true,
        overHidden: true,
      },
      {
        label: '船舶编号',
        prop: 'p3',
        type: 'date',
        overHidden: true,
      },
      {
        label: '点验时间',
        search: true,
        prop: 'p4',
        type: 'date'
      },
      {
        label: '点验人员',
        prop: 'p5',
      },
      {
        label: '船舶国籍证书是否有效',
        prop: 'p10',
        hide: true,
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
      },
      {
        label: '船舶检验证书是否有效',
        prop: 'p11',
        hide: true,
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
      },
      {
        label: '安全管理证书是否有效',
        prop: 'p12',
        hide: true,
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
      },
      {
        label: '船舶进出港报告情况',
        prop: 'p13',
        hide: true
      },
      {
        label: '船舶AIS位置',
        prop: 'p14',
        hide: true
      },
      {
        label: '船舶安全检查',
        prop: 'p15',
        hide: true
      },
      {
        label: '船舶滞留',
        prop: 'p16',
        hide: true
      },
      {
        label: '船舶协查信息重点跟踪情况',
        prop: 'p17',
        hide: true
      },
      {
        label: '事故险情情况',
        prop: 'p18',
        hide: true
      },
      {
        label: '船舶违法行为情况',
        prop: 'p19',
        hide: true
      },


      {
        label: '异常状态',
        prop: 'p6',
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
        filterable: true,
      },
      {
        label: '是否异常',
        prop: 'p6-1',
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
        search: true,
        filterable: true,
        hide: true,
        addDisplay: false,
        editDisplay: false,
        viewDisplay: false,
      },
      {
        label: '异常处置',
        prop: 'p7',
        type: 'select',
        dicData: [
          {label:'否', value:'0'},
          {label:'是', value:'1'}
        ],
        filterable: true,
        addDisplay: false,
        editDisplay: false,

      },
    ]
  }
}

export const tableOption2 = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    cellBtn: true,
    addRowBtn: true,
    editRowBtn: true,
    column: [
      {
        label: '问题描述',
        prop: 'p1',
        cell: true,
      },
    ]
  }
}